package jp.co.sn.mml.pojo.tslock;


public class TslockId implements java.io.Serializable { 

	//テーブル名称
	private String tableNm;
	//キー値
	private String keyValue;

	/** default constructor */
	public TslockId(){

	}

	/** full constructor */
	public TslockId(String tableNm,String keyValue){
		this.tableNm = tableNm;
		this.keyValue = keyValue;
	}

	//Property accessors
	public String getTableNm(){
		return this.tableNm;
	}

	public void setTableNm(String tableNm){
		this.tableNm=tableNm;
	}

	public String getKeyValue(){
		return this.keyValue;
	}

	public void setKeyValue(String keyValue){
		this.keyValue=keyValue;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof TslockId))
			return false;

		TslockId castOther = (TslockId) other;

		return ((this.getTableNm() ==  castOther.getTableNm())
				||(this.getTableNm()!=null && castOther.getTableNm() !=null 
					&& castOther.getTableNm() !=null 
					&& this.getTableNm().equals(castOther.getTableNm())))
			&& ((this.getKeyValue() ==  castOther.getKeyValue())
				||(this.getKeyValue()!=null && castOther.getKeyValue() !=null 
					&& castOther.getKeyValue() !=null 
					&& this.getKeyValue().equals(castOther.getKeyValue())))
;	}

	public int hashCode() {
		int result = 17;

		result = 37 * result
				+ (getTableNm() == null ? 0 : this.getTableNm().hashCode());
		result = 37 * result
				+ (getKeyValue() == null ? 0 : this.getKeyValue().hashCode());
		return result;
	}

}